/*
 * @# top.js 2011-12-28 下午03:01:12
 * 
 * Copyright (C) 2010 - 2011 广州羿安信息科技有限公司
 * Guangzhou ianswer information technology co. ltd.
 * 
 * All rights reserved!
 */

/**
 * 全网公共方法.
 */
var Px = {
	
	/**
	 * 用户头像处理.
	 * 
	 * @type 
	 */
	Avatar : {
		getS40Url : function(avatarPath, gender) {
			if (!avatarPath) {
				if (gender == 'female') {
					return window.cdn + '/images/female.gif';
				}
				return window.cdn + '/images/male.gif';
			}
			var dotIndex = avatarPath.indexOf('.');
			return window.imgUrl + avatarPath.substring(0, dotIndex) + '-s40' + avatarPath.substring(dotIndex);
		}
	}
};
